# -*- coding: utf-8 -*-
"""
Created on Tue Sep  7 00:05:01 2021

@author: 刘长奇-2019300677
"""
stri=['']*9
for j in range(1,10):
    stri[j-1]='0'+str(j)
for i in range(9):
 fp = open("python-"+stri[i]+".py",encoding = 'utf-8')

 codeNum = len(open("python-"+stri[i]+".py",encoding = 'utf-8').readlines()) #统计行数
 spaceNum = 0
 noteNum = 0

 for readFP in fp.readlines():
    readFP = readFP.strip()
    if readFP == "":
        spaceNum += 1
    if readFP.startswith("#"): 
        noteNum += 1
    if readFP.startswith("\""):
        noteNum += 1
    if readFP.endswith("\'''"):
        noteNum += 1
 print("\n %d号.py文件共有%d行代码" %(i+1,codeNum))
 print("其中%s行空行" %spaceNum)
 print("其中%s行注释" %noteNum)

